package me.jessyan.mvparms.demo.mvp.ui.adapter;

import android.view.View;

import com.jess.arms.base.BaseHolder;
import com.jess.arms.base.DefaultAdapter;

import java.util.List;

import javax.inject.Inject;

import me.jessyan.mvparms.demo.R;
import me.jessyan.mvparms.demo.data.entity.MessageListEntity;
import me.jessyan.mvparms.demo.mvp.ui.holder.MessageItemHolder;

/**
 * @Author: 海洋
 * @Date: 2018/8/23
 * @Desc:
 */
public class MessageListAdapter extends DefaultAdapter<MessageListEntity> {

    @Inject
    public MessageListAdapter(List<MessageListEntity> infos) {
        super(infos);
    }

    @Override
    public BaseHolder<MessageListEntity> getHolder(View v, int viewType) {
        return new MessageItemHolder(v);
    }

    @Override
    public int getLayoutId(int viewType) {
        return R.layout.item_message_list;
    }

}
